import re

class Wave(object):
    def __init__(self, data_str):
        self.data_str = data_str
        self.data_list = self.data_getlist()

    def data_getlist(self):
        hex_list = re.findall(r'\w{2}', self.data_str)
        return [int('0x' + i, 16) for i in hex_list]

def thick_cal(cal_time, measure_time, material, temperature):
    diff_time = (measure_time - cal_time)/2
    speed = 5900
    # speed = speed_dict['material']['temperature']
    thickness = diff_time * speed / 100000
    return thickness
